﻿@model IEnumerable<Biblio.Domain.Material>

@{
    ViewBag.Title = "Buscar";
}

<h2>Buscar</h2>

<p>
    @Html.ActionLink("Create New", "Create")
    @using (Html.BeginForm()){ 
    <p> Title: @Html.TextBox("busqueda")<br /> 
    <input type="submit" value="Filter" /></p> 
    }
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Titulo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.TipoMaterial)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Codigo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Sinopsis)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Editorial)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CantidadEjemplaresDisponibles)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Titulo)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TipoMaterial)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Codigo)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Sinopsis)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Editorial)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CantidadEjemplaresDisponibles)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
